package com.easy.query.test.entity.proxy;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.SQLColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.proxy.core.EntitySQLContext;
import com.easy.query.test.entity.BlogGroupIdAndName;
import com.easy.query.core.proxy.columns.types.SQLStringTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLLongTypeColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 * 如果出现属性冲突请使用@ProxyProperty进行重命名
 *
 * @author easy-query
 */
public class BlogGroupIdAndNameProxy extends AbstractProxyEntity<BlogGroupIdAndNameProxy, BlogGroupIdAndName> {

    private static final Class<BlogGroupIdAndName> entityClass = BlogGroupIdAndName.class;

    public static final BlogGroupIdAndNameProxy TABLE = createTable().createEmpty();

    public static BlogGroupIdAndNameProxy createTable() {
        return new BlogGroupIdAndNameProxy();
    }

    public BlogGroupIdAndNameProxy() {
    }

    /**
     * {@link BlogGroupIdAndName#getId}
     */
    public SQLStringTypeColumn<BlogGroupIdAndNameProxy> id() {
        return getStringTypeColumn("id");
    }

    /**
     * {@link BlogGroupIdAndName#getIdCount}
     */
    public SQLLongTypeColumn<BlogGroupIdAndNameProxy> idCount() {
        return getLongTypeColumn("idCount");
    }


    @Override
    public Class<BlogGroupIdAndName> getEntityClass() {
        return entityClass;
    }

    @Override
    public BlogGroupIdAndNameProxy createNew() {
        return createTable();
    }


    /**
     * 数据库列的简单获取
     *
     * @return
     */
    public BlogGroupIdAndNameProxyFetcher FETCHER = new BlogGroupIdAndNameProxyFetcher(this, null, SQLSelectAsExpression.empty);


    public static class BlogGroupIdAndNameProxyFetcher extends AbstractFetcher<BlogGroupIdAndNameProxy, BlogGroupIdAndName, BlogGroupIdAndNameProxyFetcher> {

        public BlogGroupIdAndNameProxyFetcher(BlogGroupIdAndNameProxy proxy, BlogGroupIdAndNameProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression) {
            super(proxy, prev, sqlSelectAsExpression);
        }


        /**
         * {@link BlogGroupIdAndName#getId}
         */
        public BlogGroupIdAndNameProxyFetcher id() {
            return add(getProxy().id());
        }

        /**
         * {@link BlogGroupIdAndName#getIdCount}
         */
        public BlogGroupIdAndNameProxyFetcher idCount() {
            return add(getProxy().idCount());
        }


        @Override
        protected BlogGroupIdAndNameProxyFetcher createFetcher(BlogGroupIdAndNameProxy cp, AbstractFetcher<BlogGroupIdAndNameProxy, BlogGroupIdAndName, BlogGroupIdAndNameProxyFetcher> prev, SQLSelectAsExpression sqlSelectExpression) {
            return new BlogGroupIdAndNameProxyFetcher(cp, this, sqlSelectExpression);
        }
    }


    public static final class Fields {
        public static final String id = "id";
        public static final String idCount = "idCount";

        private Fields() {
        }
    }
}
